﻿@{
    Layout = null;
}
@using MvcMall.AdminPortal.Controllers.AdminUser.ViewModels;
@model List<AdminUserDtoModel>
<!DOCTYPE html>
<html>
<head>
    <title>管理员列表</title>
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs({
                ajaxOptions: {
                    error: function (xhr, status, index, anchor) {
                        $(anchor.hash).html("系统繁忙,请稍候再试");
                    }
                }
            });
        });
    </script>
</head>
<body>
    <div id="tabs">
        <ul>
            <li><a href="#adminUserList">管理员列表</a></li>
            <li>@Html.ActionLink("新增管理员", "Create")</li>
        </ul>
        <div id="adminUserList">
            <table width="100%">
                <tr>
                    <th>
                        管理员Id
                    </th>
                    <th>
                        管理员用户名
                    </th>
                    <th>
                        电子邮箱
                    </th>
                    <th>
                        手机号码
                    </th>
                    <th>
                        当前状态
                    </th>
                    <th>
                    </th>
                </tr>
                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @item.UserId
                        </td>
                        <td>
                            @item.UserName
                        </td>
                        <td>
                            @item.Email
                        </td>
                        <td>
                            @item.Mobile
                        </td>
                        <td>
                            @if (item.IsLocked)
                            {
                                <text><label style="color: Red">已锁定</label>
                                </text>
                            }
                            else
                            {
                                <text>正常</text>
                            }
                        </td>
                        <td>
                            @Html.ActionLink("修改对应角色", "EditUserRole", new { @userId = item.UserId })
                        </td>
                    </tr>
                }
            </table>
        </div>
    </div>
</body>
</html>
